<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>利用Class库打造更易于维护的JS DIV鼠标拖拽类。</title>
	<script type="text/javascript" src="core/Classjs.js"></script>
	<script type="text/javascript" src="js/demo2.class.js"></script>
	<style type="text/css">
		body{
			margin: 0px;
			padding: 0px;
		}
		div{
			width:100px;
			height:100px;
		}
		#block1{
			background: gray;
		}
		#block2{
			background: red;
		}
	</style>
</head>
<body>
 <div id="block1">block1</div>
 <div id="block2">block2</div>
 <script type="text/javascript">
 	var block1 = new DomBlockDrag("block1"); 
 	var block2 = new DomBlockDrag("block2"); 
 </script>
</body>
</html>